package easymall.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.http.HttpRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;

import easymall.exception.UserLoginNoException;

@Controller
public class BaseController {
	@ModelAttribute
	public void isLogin(HttpSession se,HttpServletRequest req) throws UserLoginNoException  {
		if (se.getAttribute("user")==null) {
			throw new UserLoginNoException("login first");
		}
	}
}
